<template>

    <button @click="start">START</button>

</template>

<script>
import { defineComponent, reactive, ref } from "vue";
import { useRouter } from "vue-router";
// eslint-disable-next-line vue/multi-word-component-names
export default defineComponent({
  name: "StartStart",
  setup() {
    let router=useRouter()
    let a = ref("A");
    let b = ref("B");
    let s=reactive({
      a:"A",b:"B"
    })
    let start = () => {
      router.push({
        name: "home",
        params: {
          a:"A",
          b:b.value,
        },
        query: {
          a:s.a,
          b:s.b,
          s:JSON.stringify(s)
        },
      });
    };
// 用于将JavaScript对象转化为JSON字符串

    return { a, b, start };
  },
});
</script>

<style scoped></style>
